<template>
    <el-row class="tac" style="width: 500px;">
        <el-col :span="12">
            <h5 class="mb-2">后台管理平台</h5>
            <el-menu active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
                default-active="2" text-color="#fff" @open="handleOpen" @close="handleClose">
                <el-sub-menu index="1">
                    <template #title>
                        <el-menu-item index="1">
                            <el-icon><icon-menu /></el-icon>
                            <span>首页</span>
                        </el-menu-item>
                    </template>
                    <el-menu-item index="1-1">功能one</el-menu-item>
                    <el-menu-item index="1-2">功能two</el-menu-item>
                    <el-menu-item index="1-3">功能three</el-menu-item>
                </el-sub-menu>
                <el-sub-menu index="2">
                    <template #title>
                        <el-menu-item index="2">
                            <el-icon><icon-menu /></el-icon>
                            <span>公告</span>
                        </el-menu-item>
                    </template>
                    <el-menu-item index="1-1">功能one</el-menu-item>
                    <el-menu-item index="1-2">功能two</el-menu-item>
                    <el-menu-item index="1-3">功能three</el-menu-item>
                </el-sub-menu>
            </el-menu>
        </el-col>
    </el-row>
</template>

<script lang="ts" setup>
import { Document, Menu as IconMenu, Location, Setting, } from '@element-plus/icons-vue'

const handleOpen = (key: string, keyPath: string[]) => { console.log(key, keyPath) }
const handleClose = (key: string, keyPath: string[]) => { console.log(key, keyPath) }
</script>